PLC Functional Modules for Energy Management Functionalities

ABSTRACT

A method for programming a programmable logic controller for controlling at least one energy consumer of a machine, includes providing at least one energy consumer functional module and at least one energy control functional module in a programming device for selection by a programmer in order to program an energy management program configured to provide at least one energy management functionality for the machine. The at least one energy consumer functional module containing data specific to the at least one energy consumer. The at least one energy control functional module containing data specific to the at least one energy management functionality.

This application claims priority under 35 U.S.C. §119 to patentapplication no. DE 10 2013 002 085.9, filed on Feb. 6, 2013 in Germany,the disclosure of which is incorporated herein by reference in itsentirety.

BACKGROUND

The present disclosure relates to a method for programming aprogrammable logic controller for controlling at least one energyconsumer of a machine.

The disclosure deals with the simplified implementation of energymanagement in machines with programmable logic controllers (PLC), inparticular with possibilities for the simpler programming of a PLC.

In systems which are intended to be optimized with respect to the energyconsumption using energy management, there is at least one energyconsumer which consumes a different amount of energy in different energymodes, the energy modes being able to be specified. Examples of theseare blowers whose speed can be controlled and which are switched off inoperating pauses, servo drives whose power supply is switched off duringstandstill, or heating systems which are operated with a lower desiredtemperature value in operating pauses. Energy modes are characterized bymany characteristic numbers. These are, for example, energy consumptionin the respective mode, time needed to change between the modes, energyconsumption during the transition operation, minimum/maximum residencetimes. In addition, there are so-called energy profiles in communicationsystems, that is to say agreements relating to specified data and theirformats. Examples which may be mentioned here are “sercos Energy” or“PROFIEnergy”.

Inside the controllers which manage energy, these states are handled inthe energy management entity (program part). For this purpose, there aretwo fundamental energy management functionalities, energy monitoring(energy consumption determination) and energy mode specification. Thesefunctionalities can be modeled, for example, in PLCs using functionalmodules which are processed in the context of the PLC (PLC program).Functional modules usually each contain one or more technologically orfunctionally associated program instructions. A complete PLC program isgenerally composed of a plurality of functional modules, in which casethe individual modules can be input in different languages based on thePLC application. Functional modules can be supplied with different datawith each call (so-called entities) using associated entity datamodules.

The entire energy management can be implemented as a program orfunctional module in conjunction with a declared data structurecontaining all required energy management data. In this case, the datamay be declared in a global list of variables, that is to say they arevisible to and can be changed for all PLC program parts.

A suitable data structure may comprise configuration data for themachine (for example list of all energy modes of the machine),configuration data for the energy consumers (so-called devices) (forexample list of all energy modes of the devices with their energyconsumptions and transition times), HMI data (for example actual energyconsumption of the devices), energy management control data (for exampledesired energy mode, pause time), energy management status data (forexample actual energy mode of the machine or of all devices).

The interface to the (higher-level) application program or logic of theenergy mode management etc. may be handled using the data structure inthis case. The interface to the (lower-level) devices with respect tothe control status of the device states can likewise be handled usingthe data structure (for example using a device application program). Theinterface to the HMI can also be handled using the data structure.

In this case, the data structure may comprise all data for all energymodes or devices such that the data structure comprises the entirevolume of data for maximum expansion from the start, that is to say thestorage requirement is tied to the maximum expansion defined.

The disadvantage of such a solution is, in particular, a lack ofscalability. In most cases, the data structure is also much too largesince the machine being operated usually has not been expanded to themaximum extent. It is particularly disadvantageous that there is a hugeand vast pool of variables in which the programmer easily loses trackand is undecided as regards which variables he can write or read andwhich variables are used only internally. The implementation ofadditional functionalities is very complicated.

It is therefore desirable to simplify the programming of the energymanagement of a machine.

SUMMARY

The disclosure proposes a method for programming a programmable logiccontroller for controlling at least one energy consumer of a machinehaving the features described herein. The subclaims and the followingdescription relate to advantageous refinements.

The disclosure proposes the practice of implementing an energymanagement program for providing at least one energy managementfunctionality by means of a plurality of different functional modules.At least one energy consumer functional module (so-called devicefunctional module) and one energy control functional module are providedand can be used by a programmer when programming the energy managementprogram. In this case, data which are specific to the energy consumerand are implemented in the device functional modules and data which arespecific to the energy functionality (that is to say are independent ofthe energy consumer) and are implemented in the energy controlfunctional modules are separated. This significantly simplifiesprogramming and makes finished programs, in particular, clearer andeasier to understand.

The disclosure facilitates the programming of the energy management of amachine with at least one PLC since the program can be composed frompredefined functional modules by the programmer to form a functionalmodule structure. The program can be scaled in any desired manner byadding and interconnecting functional modules. The structure of theenergy management is flexible as a result of expandable hierarchical orstructuring levels.

Provision is made for a device functional module to be set up, in termsof programming, to control one or more energy consumers, that is to sayto trigger the output of corresponding control commands or controlsignals by the PLC. An energy consumer can preferably be controlled intwo ways. According to a first variant, the device functional moduleinternally already comprises the direct control of the energy consumer.This solution is very convenient, but the functionality of the energyconsumer must be known in detail to the device functional module forthis purpose. This is enabled, for example, using so-called energyprofiles in field bus systems (for example sercos Energy, PROFIenergy orCIPenergy) in which the energy consumers have standardized energy modes.It is likewise advantageous if the device functional module can retrieveall information (data, parameters etc.) needed for control from theenergy consumer. For this purpose, the latter is provided, inparticular, with a storage device which stores the data.

If this possibility of the generic handling of energy consumers is notpossible, a second variant is advantageous in which the devicefunctional module has interfaces containing data which must becontrolled by the programmer. In this case, the connection between theenergy consumer and the device functional module needs to be fullyprogrammed by the programmer.

A device functional module is preferably set up, in terms ofprogramming, to receive or read an item of status information (forexample feedback with regard to the energy mode of the energy consumer)from a controlled energy consumer and to provide this status information(or an item of status information generated therefrom) in a readablemanner or to transmit it further, with the result that it can beprocessed further as part of energy management.

Provision is also made for the energy control functional modules to beset up, in terms of programming, to control energy management. Thepractice of controlling energy management preferably involvescoordinating or controlling the device functional modules, in particularwith respect to the physical process, on the output side. Thispreferably involves determining and specifying the respective(individual) energy modes, which are intended to be assumed by theenergy consumers, for the associated device functional modules.

An energy control functional module preferably has at least oneinterface which is used to receive commands on the input side, inparticular for specifying an energy mode of the machine or of one ormore energy consumers.

Corresponding interfaces (in particular methods) are preferablypredefined for interchanging data between the functional modules. Thisis explained in detail at the end of the description of the figures.

Command functional modules are preferably additionally provided and areset up, in terms of programming, to output operating commands to theenergy control functional modules and/or device functional modules. Forexample, such operating commands comprise the general specification ofenergy modes (for example, type, times such as duration, start, end,etc.).

Furthermore, such operating commands also preferably comprise thespecification of boundary conditions for interruptions (for examplelength of the pause, minimum pause duration, reliable reactivation timesetc.) instead of a specific energy mode. With regard to further details,reference is made to the post-published DE 10 2012 025 194.7, thedisclosure of which is included here. These operating commands areparticularly advantageous for unplanned pauses. The energy controlfunctional modules are preferably set up, in terms of programming, toreceive these operating commands, to use them to generate operatingcommands for the energy consumers and to transmit said commands to thedevice functional modules which finally accordingly control the energyconsumers. For example, the operating commands for the energy consumersare generated in such a manner that the latter are changed to an energymode which meets the boundary conditions.

Input/output functional modules (HMI functional modules) are preferablyadditionally provided and contain the man-machine interface forcontrolling and operating the machine. Said functional modules areexpediently set up, in terms of programming, to collect and group datarelevant to energy management for visualization purposes and/or toreceive user inputs and to forward them to the command functionalmodules, for example. Data, for example current energy mode of theoverall machine, energy modes of the individual consumers, currenttransition state (“target energy mode reached” or else “in thetransition state”), current target energy mode, active (remaining) pausetime and error states or information, are typically provided forinput/output purposes.

The implementation of the disclosure in the form of software isparticularly advantageous since this enables particularly low costs, inparticular if an executing computation unit is also used for other tasksand is therefore present anyway. Suitable data storage media forproviding the computer program are, in particular, floppy disks, harddisks, flash memories, EEPROMs, CD-ROMS, DVDs and many more. It is alsopossible to download a program using computer networks (Internet,intranet etc.). PLCs are usually programmed using corresponding softwareon a programming device (for example an application under MicrosoftWindows or Linux on a PC, or a tailored programming system). Acomputation unit according to the disclosure, for example a programmingdevice for a PLC, is set up, in particular in terms of programming, tocarry out a method according to the disclosure.

Further advantages and refinements of the disclosure emerge from thedescription and the accompanying drawing.

It goes without saying that the features mentioned above and thefeatures yet to be explained below can be used not only in therespectively stated combination but also in other combinations or alonewithout departing from the scope of the present disclosure.

The disclosure is schematically illustrated in the drawing usingexemplary embodiments and is described in detail below with reference tothe drawing.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows a preferred embodiment of a PLC programming deviceaccording to the disclosure in a roughly schematic manner.

FIG. 2 shows a program scheme of an energy management program which iscomposed of a plurality of different functional modules.

FIG. 3 shows a simple program scheme of an energy management programwhich is composed of three different functional modules.

FIG. 4 shows an extended program scheme of an energy management programwhich has, inter alia, two energy control functional modules.

DETAILED DESCRIPTION

FIG. 1 illustrates a preferred embodiment of a PLC programming device 10in a roughly schematic manner, which device is set up, in terms ofprogramming, to carry out a method according to the disclosure. The PLCprogramming device 10 may be, for example, a conventional computer onwhich PLC programming software is executed and which provides aprogramming environment 20.

The figure shows the operation of programming a PLC 40 by a programmerusing the PLC programming device 10.

The PLC programming device 10 is connected to the PLC 40 to beprogrammed via a corresponding connection 30, for example an Ethernetconnection or a serial connection. The PLC 40 at least has a storagedevice 41 for accommodating the PLC application program produced and aCPU 42 for executing the stored PLC application program. The PLC 40 isalso connected to sensors 43 and actuators 44, for example by means of afield bus connection, in particular an Ethernet field bus connection,for example SERCOS III, in order to control a machine (not shown)according to the PLC application program. A sensor is, for example, atemperature, pressure, speed, position sensor etc., but also a switch,rotary knob etc., and is provided for the purpose of recording inputvariables (for example temperature, pressure, speed, position, positionof a switch or a rotary knob). Output variables (for exampletemperature, pressure, speed, current intensity, voltage, injectionquantity, position etc.) are calculated from the input variables by thePLC application program and are set using the actuators (for exampleelectronic switch, relay, valve etc.). The sensors and actuators areusually part of the machine. The actuators are used, in particular, tocontrol energy consumers.

The programming environment 20 is a programming solution which providesthe programmer with a user interface for creating the applicationprogram, here with an energy management functionality, in particular. Inthis case, the programmer defines the application program, for example,by adding program code, functional modules, documentation data andconfiguration data. The program is displayed on a screen 11 of theprogramming device 10. Preferred embodiments of energy managementprograms are illustrated in FIGS. 2 to 4.

FIG. 2 schematically shows an excerpt 100 of an energy managementprogram for managing the energy of a machine comprising a plurality ofenergy consumers, as can be represented, in particular, in a programmingenvironment for a PLC. A number of command functional modules designated“C”, an energy control functional module designated “EC”, a number ofdevice functional modules designated “D” and an HMI functional moduledesignated “HMI” are illustrated. The functional modules are linked toother parts of the PLC program which are designated “PRG”.

The central part of the energy management is the energy controlfunctional module EC which is set up, in terms of programming, tocontrol the entire sequences of the energy management specification. Onthe lower level are the device functional modules which are theinterface to the energy consumers. The energy consumers are controlledand managed by the energy control functional module, that is to say theenergy control functional module gives the desired energy mode to adevice functional module, for example, which then implements this modefor the devices associated with it.

The command functional modules, on the one hand, may give specificationsfor the entire machine at the level of the energy control functionalmodule or optionally may also give direct specifications for the energymode of a device functional module at the device level.

The HMI functional module is set up, in terms of programming, to outputvisualizations designated “VIS”, for example on a screen for a user. TheHMI functional module is used to collect data for (different) HMIpurposes and to provide said data in a grouped manner. In this case, therequired data are contained inside the declared data in the respectivefunctional modules in the case of the object-oriented programmingconcept (every functional module entity brings its own data along inthis case). Just like a control system functional module (notillustrated in FIG. 2), a HMI functional module is therefore used topresent these distributed data for the machine operator. This isparticularly advantageous in the case of an object-oriented programmingconcept since these data which are contained inside the respectivefunctional modules are not intended to be able to be accessed from theoutside in this case. In this case, the data are preferably providedonly using so-called methods (encapsulation of the data). A separate HMIfunctional module is expediently used for each group of data. Forexample, the energy control functional module is set up, in terms ofprogramming, to output data to the HMI functional module, which data aregenerated by the energy control functional module, for example, fromstatus messages received by the energy control functional module fromthe device functional modules.

The disclosure results in a flexible program architecture which can bescaled in any desired manner since as many functional modules asrequired can be respectively used, in particular. In particular, one ormore device functional modules, one or more command functional modules,none, one or more HMI functional modules and one or more (cf. FIG. 4)energy control functional modules can therefore be used andinterconnected. At the same time, it is possible to implement ahierarchy by arranging the functional modules on different levels.

An example of energy management for a machine comprising a consumer isnow intended to be explained below with reference to FIG. 3 which showsa simple embodiment 200 of an energy management program having only onecommand functional module “C”, an energy control functional module “EC”and a device functional module “D”.

As an example, the command functional module “C” specifies a length ofan imminent operating pause (pause time). The energy control functionalmodule “EC” is set up, in terms of programming, to use its internaldatabase to select an appropriate consumer energy mode. In this case,the optimum consumer energy mode in each case is expediently selectedusing energy-saving attributes (for example minimum pause time, energyconsumption of an energy mode, etc.) in order to minimize, for example,the no-load losses in the pause times. The energy control functionalmodule “EC” is set up, in terms of programming, to output the selectedconsumer energy mode to the device functional module which in turn isset up, in terms of programming, to accordingly control the consumer,with the result that it assumes the desired consumer energy mode.

According to another example, the command functional module “C”specifies a machine energy mode for the machine. The energy controlfunctional module “EC” is set up, in terms of programming, to use itsinternal database to select an appropriate consumer energy mode. Forexample, the database of the energy control functional module alreadycomprises a link between the machine energy mode and the consumer energymode. The energy control functional module is set up, in terms ofprogramming, to output the selected consumer energy mode to the devicefunctional module which in turn is set up, in terms of programming, toaccordingly control the consumer, with the result that it assumes thedesired consumer energy mode.

The connection of the functional modules is used to link the respectivefunctional modules to their cooperating functional modules. As a result,the interchange of data between the cooperating functional modules canalso be automated, in particular. In this case, the functional modulescan be connected, for example, by virtue of the functional modules beingset up, in terms of programming, to inform each other, at the inputs, ofwhich lower-level or higher-level functional modules are present. Analternative type of connection comprises stating the respectivelylower-level functional module in the declaration of a superordinatefunctional module. This makes it possible for the functional modules toreport to each other, for example during an initialization phase of thefinished PLC program, and as a result to know their respective entitiesin order to then interchange data therewith. Said embodiments providethe advantage that the programmer need not program any connection in thePLC program code.

An example of the use of a plurality of energy control functionalmodules for managing the energy of a machine shall now be explainedbelow with reference to FIG. 4 which shows an embodiment 300 of anenergy management program having a plurality of command functionalmodules “C”, two energy control functional modules “EC1” and “EC2” and aplurality of device functional modules “D”. The two energy controlfunctional modules “EC1” and “EC2” are hierarchically interconnected, inwhich case the subordinate energy control functional module “EC2” is setup, in terms of programming, to group a plurality of device functionalmodules D and to present them to the superordinate energy controlfunctional module “EC1” as a shared resource, such as a single devicefunctional module, that is to say to simulate a device functionalmodule. Further energy control functional modules and/or devicefunctional modules may additionally (not shown) be subordinate to thesuperordinate energy control functional module “EC1”. The grouping usingsubordinate energy control functional modules can be used in aparticularly advantageous manner to structure machine units, in whichcase each machine unit comprises a plurality of energy consumers and thesuperordinate energy control functional module only has a view ofmachine units.

According to one preferred refinement of the disclosure, the functionalmodules are set up, in terms of programming, to know their respectiveconnected (lower-level or higher-level) functional modules. As a result,they can directly interchange data with these functional modules withoutan additional application program. This spares the programmer fromimplementing a program code for copying over the data from therespective functional modules themselves between the functional modules.Otherwise, functional module outputs (status messages) from a devicefunctional module would have to be copied over by the programmer toinputs of an energy control functional module, for example.

In the case of object-oriented programming with the above-describeddefinition of the connection structure in the functional moduledeclaration, the functional modules log onto one another according tothe declaration and as a result know the respective correspondingfunctional modules. This is explained using an example: fmBasicDevice:IL_(—)4EE_BasicDeviceType01(fmEnergyControl).

As a result of the declaration, the device functional module“fmBasicDevice” knows which entity of the energy control functionalmodule it is associated with, namely “fmEnergyControl”.

This provides a unidirectional association.

The device functional module logs onto the superordinate energy controlfunctional module during its initialization phase, with the result thatthe lower-level device functional module is therefore in turn known tothe energy control functional module. This logging-on is expedientlycarried out using object-oriented methods. For this purpose, the energycontrol functional module preferably comprises a method (that is to saya call interface) which is called by the device functional module duringthe initialization phase. This is particularly advantageous since themethods need not be known to the programmer since they are used only bythe functional modules for internal communication. Alternatively oradditionally, the data of the cyclical transmission are advantageouslyalso transmitted using methods (in particular methods which are notpublicly known).

Overall, any data interchange within energy management can therefore becarried out in a concealed manner. Only the interfaces to theapplication program (cf. PRG in FIG. 2) must be known to the programmersince he must control them in his application program.

Alternatively or additionally, a functional module may havenon-documented internal variables, that is to say data which are notapplied to the functional module as an input or output. These variablesare written and read for communication between functional modules. Thisis possible, in particular, as a result of the fact that the variablenames are known to the other functional modules. In this respect, methodcalls and data interchange can fundamentally be carried out in anequivalent manner using variables.

What is claimed is:
 1. A method for programming a programmable logic controller configured to control at least one energy consumer of a machine, comprising: selecting at least one of (i) at least one energy consumer functional module, and (ii) at least one energy control functional module in a programming device in order to program an energy management program configured to provide at least one energy management functionality for the machine, wherein the at least one energy consumer functional module is configured to contain data specific to the at least one energy consumer, and wherein the at least one energy control functional module is configured to contain data specific to the at least one energy management functionality.
 2. The method according to claim 1, wherein the at least one energy consumer functional module is configured, in terms of programming, to control the at least one energy consumer.
 3. The method according to claim 2, wherein: the at least one energy consumer functional module is configured, in terms of programming, to internally directly control the at least one energy consumer using an energy profile, and the energy profile is one of sercos Energy, PROFIenergy, and CIPenergy.
 4. The method according to claim 1, wherein the at least one energy consumer functional module is configured, in terms of programming, to receive status information from the at least one energy consumer.
 5. The method according to claim 1, wherein the at least one energy consumer functional module is configured, in terms of programming, to log onto the at least one energy control functional module.
 6. The method according to claim 1, wherein the at least one energy control functional module is configured, in terms of programming, to control the at least one energy consumer functional module.
 7. The method according to claim 1, wherein the at least one energy control functional module is configured, in terms of programming, to simulate the at least one energy consumer functional module.
 8. The method according to claim 1, wherein the at least one energy control functional module is configured, in terms of programming, to provide an externally callable log-on method.
 9. The method according to claim 1, wherein the at least one energy control functional module is configured, in terms of programming, to control at least one other entity of the energy control functional module.
 10. The method according to claim 1, wherein the at least one energy control functional module is configured, in terms of programming, to log onto another entity of the energy control functional module.
 11. The method according to claim 1, further comprising: selecting at least one command functional module, wherein the command functional module is configured, in terms of programming, to output an operating command of the energy management functionality to at least one of (i) the at least one energy control functional module, and (ii) the at least one energy consumer functional module.
 12. The method according to claim 11, wherein the at least one command functional module is configured, in terms of programming, to log onto the at least one energy control functional module.
 13. The method according to claim 11, wherein the operating command of the energy management functionality includes at least one of (i) an energy mode specification, (ii) a pause time, and (iii) an availability time.
 14. The method according to claim 11, wherein the at least one energy control functional module is configured, in terms of programming, to convert the operating command of the energy management functionality into an operating command for the at least one energy consumer.
 15. The method according to claim 1, further comprising: selecting at least one input/output functional module, and wherein the input/output functional module is configured, in terms of programming, to collect and group data relevant to energy management for visualization purposes.
 16. A computation unit, comprising: a programming device including at least one energy consumer functional module and at least one energy control functional module, wherein the computation unit is configured to carry out a method for programming a programmable logic controller configured to control at least one energy consumer of a machine, wherein the method includes selecting at least one of (i) the at least one energy consumer functional module, and (ii) the at least one energy control functional module in the programming device in order to program an energy management program configured to provide at least one energy management functionality for the machine, wherein the at least one energy consumer functional module is configured to contain data specific to the at least one energy consumer, and wherein the at least one energy control functional module is configured to contain data specific to the at least one energy management functionality.
 17. The computation unit according to claim 16, wherein a computer program includes a program code configured to cause the computation unit to carry out the method when the program code is executed on the computation unit.
 18. A machine-readable storage medium comprising: a computer program product including a program code configured to cause a computation unit to carry out a method for programming a programmable logic controller configured to control at least one energy consumer of a machine when the program code is executed on the computation unit, wherein the method includes selecting at least one of (i) at least one energy consumer functional module, and (ii) at least one energy control functional module in the programming device in order to program an energy management program configured to provide at least one energy management functionality for the machine, wherein the at least one energy consumer functional module is configured to contain data specific to the at least one energy consumer, and wherein the at least one energy control functional module is configured to contain data specific to the at least one energy management functionality. 